package net.rlair.sbdemo.aspect;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

/**
 * 切面类1.
 *
 * @author ybr
 * @version 1.0.0.0
 */
@Aspect
@Component
@Order(1)
public class Yangbairong1 implements Ordered {

    @Override
    public int getOrder() {
        return 1;
    }

    @Pointcut("execution(* net.rlair.sbdemo.controller.ZhaozichenController.list(..))")
    public void pointCut() {
    }

    @Before("pointCut()")
    public void before() {
        System.out.println("Aspect1 before ......");
    }

    @After("pointCut()")
    public void after() {
        System.out.println("Aspect1 after ......");
    }

    @After("pointCut()")
    public void afterThrowing() {
        System.out.println("Aspect1 afterThrowing ......");
    }

}
